import { APP_FILTER } from "@nestjs/core";
import { AppController } from "./app.controller";
import { Module } from "@nestjs/common";
import { CustomExceptionFilter } from "./@nestjs/common/custom-exception.filter";
import { MyPipe } from "./my.pipe";
import { APP_PIPE } from "@nestjs/core/constants";
import { AccountController } from "./account.controller";
@Module({
  // 在模块中注册控制器
  controllers: [AppController, AccountController],
  providers: [
    {
      provide: "PREFIX",
      useValue: "prefix",
    },
    {
      provide: APP_FILTER,
      useClass: CustomExceptionFilter,
    },
    {
      provide: APP_PIPE,
      useClass: MyPipe,
    },
  ],
})
export class AppModule {}
